﻿<%@codepage="65001"%>
<!--#include file="../inc/conn.asp"-->
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head>
<title>Actions</title>
</head>
<%
app = request("app")
act = request("act")
If app = "setting" Then
	Call doSetting()
elseif app = "donate" then
	if act = "del" then call getDel(request("id"))
end if
'全局设置
Sub doSetting()
	site	=	request("site")
	domain	=	request("domain")
	topic	=	request("topic")
	topicDetail	=	request("topic_detail")
	photo	=	request("photo")
	alipay	=	request("alipay")
	partner	=	request("partner")
	key		=	request("key")
	sum		=	Replace(request("sum")," ","")
	Call OpenData()
		Set rsSet = server.CreateObject("adodb.recordset")
		sqlSet = "select top 1 * from [config] where id > 0"
		rsSet.open sqlSet,conn,1,3
		If (rsSet.eof and rsSet.bof) Then
			conn.execute("insert into [config](site,domain,topic,photo,alipay,[partner],[key],[sum],topicDetail) values('"&site&"','"&domain&"','"&topic&"','"&photo&"','"&alipay&"','"&partner&"','"&key&"','"&sum&"','"&topicDetail&"')")
		Else
			rsSet("site")		=	site
			rsSet("domain")		=	domain
			rsSet("topic")		=	topic
			rsSet("photo")		=	photo
			rsSet("alipay")		=	alipay
			rsSet("partner")	=	partner
			rsSet("key")		=	key
			rsSet("sum")		=	sum
			rsSet("topicDetail")		=	topicDetail
			rsSet.update
		End If
		Set rsSet = Nothing
	Call CloseData()
	Call ShowMsg("保存成功！","back")
End Sub
Sub getDel(id)
	call opendata()
		conn.execute("delete * from [donate-list] where id="&clng(id))
		Call ShowMsg("删除成功！","back")
	call closedata()
End Sub
%>
<body>
</body>
</html>